package com.dongjiantong.biz.service;

import com.dongjiantong.biz.model.EarMarks;
import com.dongjiantong.mybatis.BaseService;
import org.apache.ibatis.annotations.Options;

import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2017/11/14.
 */
public interface EarMarksWriteService extends BaseService<EarMarks> {

    /**
     * 根据 主键 更新一组耳标
     *
     * @param earMarksList
     * @return
     */
    Boolean updateEarMarkBySome(List<EarMarks> earMarksList);

    /**
     * 根据耳标号 更新一组耳标或者 一个耳标
     * <p>
     * <set>
     * <if test="isSelected != null">is_selected = #{isSelected},</if>
     * <if test="status != null">status = #{status},</if>
     * <if test="woreAt != null">wore_at = #{woreAt},</if>
     * <if test="outedAt != null">outed_at = #{outedAt}</if>
     * <if test="stableId != null">stable_id = #{breedStableId},</if>
     * <if test="stableNumber != null">stable_number = #{breedStableNumber},</if>
     * </set>
     * <where>
     * <if test="markNumbers != null">AND mark_number IN
     * <foreach collection="markNumbers" open="(" separator="," close=")" item="markNumber">
     * #{markNumber}
     * </foreach>
     * </if>
     * <if test="markNumber!=null">AND mark_number = #{markNumber}</if>
     *
     * @param map
     * @return
     */
    Boolean updateMarks(Map<String, Object> map);
}
